import junit.framework.TestCase;
import org.junit.Test;

public class ComplexTest5317 extends TestCase {
    MyComplex com1 = new MyComplex(0,0);
    MyComplex com2 = new MyComplex(0,1);
    MyComplex com3 = new MyComplex(1,0);
    MyComplex com4 = new MyComplex(2,3);
    MyComplex com5 = new MyComplex(6,-7);
    @Test
    public void testNormal() {
        assertEquals("0.0",com1.toString());
        assertEquals("1.0i",com2.toString());
        assertEquals("1.0",com3.toString());
        assertEquals("2.0+(3.0i)",com4.toString());
        assertEquals("6.0+(-7.0i)",com5.toString());
    }

    @Test

    public void testAdd (){
        assertEquals("1.0+(1.0i)",com2.ComplexAdd(com3).toString());
        assertEquals("3.0+(3.0i)",com4.ComplexAdd(com3).toString());
    }

    @Test

    public void testMulti (){
        assertEquals("1.0i",com2.ComplexMulti(com3).toString());
        assertEquals("2.0+(3.0i)",com4.ComplexMulti(com3).toString());
    }


}